package cn.com.KnowNews.service.imlp;

import cn.com.KnowNews.dao.IAdminDao;
import cn.com.KnowNews.dao.daoImpl.AdminDaoImpl;
import cn.com.KnowNews.entity.Admin;
import cn.com.KnowNews.service.IAdminService;

public class AdminServiceImpl implements IAdminService {

    public Admin login(Admin admin) throws Exception {
        IAdminDao adminDao = new AdminDaoImpl();
        return adminDao.checkAdmin(admin);
    }

    public  boolean AddAdmin(Admin admin) throws  Exception{
        IAdminDao adminDao = new AdminDaoImpl();
        return adminDao.addAdmin(admin);
    }
}
